package core.events
{
	public final class PutIoErrorEvent extends PutIoEvent
	{						
		private var _errorMessage:String;		
		
		public function PutIoErrorEvent(_bubbles:Boolean = false, _cancelable:Boolean = false)
		{
			super(PUT_IO_ERROR_EVENT, _bubbles, _cancelable);
		}
		
		/**
		 * Get error message returned by Put.io or by Flash VM in case of a connection error
		 */
		public function get errorMessage():String
		{
			return _errorMessage;
		}

		/**
		 * Set the error message
		 */
		public function set errorMessage(value:String):void
		{
			_errorMessage = value;
		}

		public override function toString():String
		{
			return super.toString()+' error='+errorMessage;
		}		
	}
}